object Form1: TForm1
  Left = 340
  Top = 256
  Width = 752
  Height = 551
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 160
    Top = 32
    Width = 473
    Height = 385
    Caption = 'Panel1'
    TabOrder = 0
    object Edit1: TEdit
      Left = 168
      Top = 72
      Width = 121
      Height = 21
      TabOrder = 3
      Text = 'Edit1'
      OnMouseDown = Edit1MouseDown
    end
    object Edit2: TEdit
      Left = 168
      Top = 112
      Width = 121
      Height = 21
      TabOrder = 4
      Text = 'Edit2'
      OnMouseDown = Edit2MouseDown
    end
    object Edit3: TEdit
      Left = 168
      Top = 152
      Width = 121
      Height = 21
      TabOrder = 5
      Text = 'Edit3'
      OnMouseDown = Edit3MouseDown
    end
    object tsdbdtsex_lookup: TtsDBEdit
      Left = 168
      Top = 32
      Width = 121
      Height = 21
      DataField = 'sex_lookup'
      DataSource = DataSource1
      TabOrder = 2
      ListField = 'sex_lookup'
      KeyField = 'sex'
      LookUpKeyField = #32534#30721
      LookUpResultField = #21517#31216
      SqlTag = 110
      SqlStrings.Strings = (
        
          'select          code '#32534#30721',          name '#21517#31216',          py_code '#25340#38899#30721',' +
          '          wb_code  '#20116#31508#30721'   from dic_responce_group(nolock)  where ' +
          'py_code like :py_code and        wb_code  like :wb_code and     ' +
          '   code    like :code   and        name    like  '#39'%'#39' + :name')
      DBGridDropColumnWidth = '50,100,50,50,'
      FetchDataOnce = True
      LookupParams = <
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
          Value = '%'
        end>
      ScrollParams = <
        item
          DataType = ftString
          Name = 'code'
          ParamType = ptInput
          Value = '%'
        end>
      FilterParams = <
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
        end>
      AutoScroll = True
      DBGridAutoDropDown = False
      ConnectComponent = tsConnect1
      NullValueKey = 27
      AutoInputSwitch.AutoSwitch = True
      AutoInputSwitch.NumericParam = #32534#30721
      AutoInputSwitch.LetterParam = #25340#38899#30721
      AutoInputSwitch.ChineseCharactersParam = #21517#31216
      AutoInputSwitch.StarCharactersParam = #20116#31508#30721
    end
    object tsdbdtresponse_type_lookup: TtsDBEdit
      Left = 166
      Top = 183
      Width = 123
      Height = 21
      DataField = 'response_type_lookup'
      DataSource = DataSource2
      TabOrder = 1
      ListField = 'response_type_lookup'
      KeyField = 'response_type'
      LookUpKeyField = #32534#30721
      LookUpResultField = #21517#31216
      SqlStrings.Strings = (
        
          'select          code '#32534#30721',          name '#21517#31216',          py_code '#25340#38899#30721',' +
          '          wb_code  '#20116#31508#30721', '#39#39' test   from dic_responce_type(nolock)' +
          '  where py_code like :py_code and        wb_code  like :wb_code ' +
          'and        code    like :code   and        name    like  '#39'%'#39' + :' +
          'name and       deleted_flag = '#39'0'#39'      -- and code not in('#39'15'#39','#39 +
          '02'#39','#39'07'#39','#39'03'#39','#39'04'#39','#39'14'#39','#39'09'#39','#39'10'#39','#39'11'#39')')
      FetchDataOnce = True
      LookupParams = <>
      ScrollParams = <
        item
          DataType = ftString
          Name = 'code'
          ParamType = ptInput
        end>
      FilterParams = <
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
        end>
      AutoScroll = True
      DBGridAutoDropDown = False
      ConnectComponent = tsConnect1
      NullValueKey = 27
      AutoInputSwitch.AutoSwitch = True
      AutoInputSwitch.NumericParam = #32534#30721
      AutoInputSwitch.LetterParam = #25340#38899#30721
      AutoInputSwitch.ChineseCharactersParam = #21517#31216
      AutoInputSwitch.StarCharactersParam = #20116#31508#30721
    end
    object tsedtSupply: TtsDBEdit
      Left = 167
      Top = 223
      Width = 122
      Height = 22
      DataField = 'supply_code_lookup'
      DataSource = DataSource3
      Font.Charset = GB2312_CHARSET
      Font.Color = clWindowText
      Font.Height = -14
      Font.Name = #23435#20307
      Font.Style = []
      ParentFont = False
      TabOrder = 0
      ListField = 'supply_code_lookup'
      KeyField = 'supply_code'
      LookUpKeyField = #32534#30721
      LookUpResultField = #21517#31216
      SqlStrings.Strings = (
        'select code '#32534#30721', '
        '       name '#21517#31216', '
        '       py_code '#25340#38899#30721', '
        '       wb_code  '#20116#31508#30721' '
        'from dic_supply_code(nolock)'
        'where py_code+wb_code like '#39'%'#39'+:py_code and'
        '      wb_code  like :wb_code and'
        '      code    like :code   and'
        '      name    like '#39'%'#39'+:name'
        'and deleted_flag = '#39'0'#39
        '--order by sort_code '
        '--sqltag = 15'
        'order by'
        'case when charindex(REPLACE(:name,'#39'%'#39' , '#39#39') ,name) = 1 then 1'
        'WHEN CHARINDEX(REPLACE(:name,'#39'%'#39' , '#39#39') ,name) = 2 then 2'
        'WHEN CHARINDEX(REPLACE(:name,'#39'%'#39' , '#39#39') ,name) = 3 then 3'
        'else 4 end')
      DBGridDropHeight = 250
      DBGridDropColumnWidth = '80;200;60;60;'
      LookupParams = <
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
          Value = '%'
        end>
      ScrollParams = <
        item
          DataType = ftString
          Name = 'code'
          ParamType = ptInput
          Value = '%'
        end>
      FilterParams = <>
      AutoScroll = True
      DBGridAutoDropDown = False
      ConnectComponent = tsConnect1
      NullValueKey = 27
      AutoInputSwitch.AutoSwitch = True
      AutoInputSwitch.NumericParam = #32534#30721
      AutoInputSwitch.LetterParam = #25340#38899#30721
      AutoInputSwitch.ChineseCharactersParam = #21517#31216
      AutoInputSwitch.StarCharactersParam = #20116#31508#30721
    end
    object tsedtIcdCode: TtsDBEdit
      Left = 107
      Top = 269
      Width = 254
      Height = 21
      DataField = 'icd_code2_lookup'
      DataSource = DataSource4
      TabOrder = 6
      ListField = 'icd_code2_lookup'
      KeyField = 'icd_code2'
      LookUpKeyField = #32534#30721
      LookUpResultField = #21517#31216
      SqlStrings.Strings = (
        'SELECT code '#32534#30721','
        '       NAME '#21517#31216','
        '       py_code '#25340#38899#30721','
        '       wb_code '#20116#31508#30721','
        '       d_code '#33258#23450#20041#30721
        'From   dic_icd_code(NOLOCK)'
        'WHERE  py_code+wb_code  LIKE  '#39'%'#39'+:py_code'
        '   AND wb_code LIKE  :wb_code'
        '   AND d_code LIKE :d_code'
        '   AND code LIKE :code'
        '   AND NAME LIKE '#39'%'#39' + :NAME'
        '   AND Isnull(icd_ver,'#39'0'#39') = :icd_ver'
        '   AND Isnull(icd_type,'#39'0'#39') = :icd_type'
        '   AND flag = '#39'0'#39
        '   AND code like '#39'B%'#39
        '   AND deleted_flag = '#39'0'#39
        'ORDER BY'
        'CASE '
        'WHEN charindex(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 1 then 1'
        'WHEN CHARINDEX(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 2 then 2'
        'WHEN CHARINDEX(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 3 then 3'
        'ELSE 4 '
        'END')
      DBGridDropHeight = 250
      DBGridDropColumnWidth = '50,100,50,50,50,'
      LookupParams = <
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #33258#23450#20041#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
          Value = '%'
        end>
      ScrollParams = <
        item
          DataType = ftString
          Name = 'code'
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftSmallint
          Name = 'icd_ver'
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = 'icd_type'
          ParamType = ptInput
          Size = 1
          Value = '1'
        end>
      FilterParams = <>
      AutoScroll = True
      DBGridAutoDropDown = False
      ConnectComponent = tsConnect1
      NullValueKey = 27
      AutoInputSwitch.AutoSwitch = True
      AutoInputSwitch.NumericParam = #33258#23450#20041#30721
      AutoInputSwitch.LetterParam = #25340#38899#30721
      AutoInputSwitch.ChineseCharactersParam = #21517#31216
      AutoInputSwitch.StarCharactersParam = #20116#31508#30721
    end
    object tsedtIcdCode1: TtsDBEdit
      Left = 107
      Top = 316
      Width = 254
      Height = 21
      DataField = 'icd_code3_lookup'
      DataSource = DataSource5
      TabOrder = 7
      ListField = 'icd_code3_lookup'
      KeyField = 'icd_code3'
      LookUpKeyField = #32534#30721
      LookUpResultField = #21517#31216
      SqlStrings.Strings = (
        'SELECT code '#32534#30721','
        '       NAME '#21517#31216','
        '       py_code '#25340#38899#30721','
        '       wb_code '#20116#31508#30721','
        '       d_code '#33258#23450#20041#30721
        'From dic_icd_code(NOLOCK)'
        'WHERE py_code+wb_code LIKE '#39'%'#39'+:py_code'
        '   AND wb_code LIKE  :wb_code'
        '   AND d_code LIKE :d_code'
        '   AND code LIKE :code'
        '   AND NAME LIKE '#39'%'#39' + :NAME'
        '   AND Isnull(icd_ver,'#39'0'#39') = :icd_ver'
        '   AND Isnull(icd_type,'#39'0'#39') = :icd_type'
        '   AND flag = '#39'0'#39'        '
        '   AND code like '#39'Z%'#39'     '
        '   AND deleted_flag = '#39'0'#39'  '
        'ORDER BY'
        'CASE '
        'WHEN charindex(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 1 then 1'
        'WHEN CHARINDEX(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 2 then 2'
        'WHEN CHARINDEX(REPLACE(:NAME,'#39'%'#39' , '#39#39') ,name) = 3 then 3'
        'ELSE 4 '
        'END')
      DBGridDropHeight = 250
      LookupParams = <
        item
          DataType = ftString
          Name = #25340#38899#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #20116#31508#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #33258#23450#20041#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #32534#30721
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = #21517#31216
          ParamType = ptInput
          Value = '%'
        end>
      ScrollParams = <
        item
          DataType = ftString
          Name = 'code'
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftSmallint
          Name = 'icd_ver'
          ParamType = ptInput
          Value = '%'
        end
        item
          DataType = ftString
          Name = 'icd_type'
          ParamType = ptInput
          Size = 1
          Value = '1'
        end>
      FilterParams = <>
      AutoScroll = True
      DBGridAutoDropDown = False
      ConnectComponent = tsConnect1
      NullValueKey = 27
      AutoInputSwitch.AutoSwitch = True
      AutoInputSwitch.NumericParam = #33258#23450#20041#30721
      AutoInputSwitch.LetterParam = #25340#38899#30721
      AutoInputSwitch.ChineseCharactersParam = #21517#31216
      AutoInputSwitch.StarCharactersParam = #20116#31508#30721
    end
  end
  object btn1: TButton
    Left = 48
    Top = 160
    Width = 75
    Height = 25
    Caption = 'btn1'
    TabOrder = 1
    OnClick = btn1Click
  end
  object btn2: TButton
    Left = 48
    Top = 208
    Width = 75
    Height = 25
    Caption = 'btn2'
    TabOrder = 2
    OnClick = btn2Click
  end
  object tsConnect1: TtsConnect
    SqlTableName = 'sys_sql_list'
    SqlTextFieldName = 'sql_text'
    SqlIDFieldName = 'sql_id'
    Left = 88
    Top = 72
  end
  object con1: TADOConnection
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=sql;Persist Security Info=True;User' +
      ' ID=sa;Initial Catalog=gzzyy_his_mz;Data Source=192.168.1.216\sq' +
      'l2008r2;Application Name=mzcpr'
    Provider = 'SQLOLEDB.1'
    Left = 40
    Top = 72
  end
  object ClientDataSet1: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 40
    Top = 16
    object strngfldds1sex: TStringField
      FieldName = 'sex'
      Size = 5
    end
    object strngfldds1sex_lookup: TStringField
      FieldKind = fkInternalCalc
      FieldName = 'sex_lookup'
      Size = 8
    end
  end
  object DataSource1: TDataSource
    DataSet = ClientDataSet1
    Left = 80
    Top = 16
  end
  object ClientDataSet2: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 40
    Top = 264
    object strngfldClientDataSet2response_type: TStringField
      FieldName = 'response_type'
      Size = 2
    end
    object strngfldClientDataSet2response_type_lookup: TStringField
      FieldKind = fkInternalCalc
      FieldName = 'response_type_lookup'
      Size = 32
    end
  end
  object DataSource2: TDataSource
    DataSet = ClientDataSet2
    Left = 104
    Top = 264
  end
  object ClientDataSet3: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 40
    Top = 320
    object StringField1: TStringField
      FieldName = 'supply_code'
      Size = 5
    end
    object StringField2: TStringField
      FieldKind = fkInternalCalc
      FieldName = 'supply_code_lookup'
      Size = 32
    end
  end
  object DataSource3: TDataSource
    DataSet = ClientDataSet3
    Left = 104
    Top = 320
  end
  object ClientDataSet4: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 40
    Top = 368
    object ClientDataSet4icd_code2: TStringField
      FieldName = 'icd_code2'
      Size = 5
    end
    object ClientDataSet4icd_code2_lookup: TStringField
      FieldKind = fkInternalCalc
      FieldName = 'icd_code2_lookup'
      Size = 10
    end
  end
  object DataSource4: TDataSource
    DataSet = ClientDataSet4
    Left = 104
    Top = 368
  end
  object DataSource5: TDataSource
    DataSet = ClientDataSet5
    Left = 104
    Top = 424
  end
  object ClientDataSet5: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 40
    Top = 424
    object ClientDataSet5icd_code3: TStringField
      FieldName = 'icd_code3'
      Size = 5
    end
    object ClientDataSet5icd_code3_lookup: TStringField
      FieldKind = fkInternalCalc
      FieldName = 'icd_code3_lookup'
      Size = 10
    end
  end
end
